﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../addons/stonefish_chailihe/template/images/reset.css?2014-08-28" media="all" />
<link rel="stylesheet" type="text/css" href="../addons/stonefish_chailihe/template/images/prize.css?2014-08-28" media="all" />
<script type="text/javascript" src="../addons/stonefish_chailihe/template/images/common.js?2014-08-28"></script>
<script type="text/javascript" src="../addons/stonefish_chailihe/template/images/zepto_min.js?2014-08-28"></script>
<title>{$reply['title']}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<meta name="Description" content="{$reply['description']}" />
<!-- Mobile Devices Support @begin -->
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<!-- Mobile Devices Support @end -->
<style>
    img{max-width:100%!important;}
	body{background-color: {$bgcolor};}
	.copyright{color: {$text02color};}
	.prize-title,.prize-title-duijiang{color: {$text01color};}
	.prize-ps{color: {$text01color};}
</style>
<script type="text/javascript">  
window.onload = function() {
	var FormManager = {
		dom: {
			panel: ".panel-box",
			btnClose: ".panel-close"
		},
		init: function() {
			window.CMER.DomQuery(this.dom);

			this.dom.btnClose.addEventListener("click", this.hidePanel.bind(this), false);
		},
		showPanel: function() {
			this.dom.panel.classList.add("show");
		},
		hidePanel: function() {
			this.dom.panel.classList.remove("show");
		}
	}

	var MainManager = {
		dom: {
			{php $i=1;}
			{loop $awarding $awardingrow}
			{if $awardingrow['pass']!=''}btnExchange{$i}: ".btn-exchange{$i}",{/if}
			{php $i++;}
            {/loop}
		},
		init: function() {
			window.CMER.DomQuery(this.dom);

			{php $i=1;}
			{loop $awarding $awardingrow}
			{if $awardingrow['pass']!=''}this.dom.btnExchange{$i}.addEventListener("click", FormManager.showPanel.bind(FormManager), false);{/if}
			{php $i++;}
            {/loop}
		}
	}

	MainManager.init();
	FormManager.init();
}
</script>
<style type="text/css"> 
.selectedtypeid{
	margin:10px;
	background:{$text04color};height:50px;
	color:{$text05color};
	-moz-border-radius: 10px;      /* Gecko browsers */
    -webkit-border-radius: 10px;   /* Webkit browsers */
    border-radius:10px;            /* W3C syntax */
}
.selectedtypeid select {
   background: transparent;
   width: 100%;color:{$text05color};
   padding: 5px;
   font-size: 16px;
   border: 0px;
   height: 50px;
   -webkit-appearance: none; /*for chrome*/
}
.con{
	background:{$text04color};
	color:{$text05color};
}
{if $isinfo}.con .title{text-align:center;padding:5px 10px;}{/if}
.con .title a:link,.con .title a:focus,.con .title a:hover,.con .title a:active{
    color:{$text05color};
}
.textdj a:link,.textdj  a:focus,.textdj  a:hover,.textdj  a:active{
    color:{$text05color};
}
.con .end  a:link,.con .end  a:focus,.con .end  a:hover,.con .end  a:active{
    color:{$text05color};
}
.btn-send{
	border: none;
	border-radius: 5px;
	background: {$text05color};
	color:{$text04color};
	height: 45px;
	text-align: center;
	line-height: 45px;
	font-size: 16px;
	margin: 10px auto;
	width: 85%;
	display: block;
	left: 25px;
}
.text label{
	float: left;
	width: 20%;
	font-size: 17px;
	color: {$text05color};
	text-align: right;
	height: 45px;
	line-height: 70px;
	position: relative;
	white-space: nowrap;
}
.text input[type='email'],
.text input[type='text'],
.text input[type='tel']{
	margin-top: 25px;
	height: 20px;
	line-height: 20px;
	background-color: transparent;
	color: {$text05color};
	font-size: 17px;
	width: 70%;
	border: none;
	border-bottom: 1px solid {$text05color};
}
.text { margin:20px;}
</style> 
</head>
<body onselectstart="return true;" ondragstart="return false;">
    <div class="shadow-prize"></div>
    <div data-role="container" class="container">
        <header data-role="header"><!----></header>
        <section data-role="body" class="body">
            {if $isinfo&&$zhongjiang}
			 <dl class="prize-ps-duijiang">
				<div class="con">
				    <div class="title">{$reply['userinfo']}</div>
					<div class="content">
						<div class="text">
						<form action="{$userinfosave}" method="post">
                        {if $reply['isrealname']==1}<label for="info-name">姓　名</label><input type="text" name="info-name" value="{$profile['realname']}" />{/if}
                        {if $reply['ismobile']==1} <label for="info-tel">手　机</label><input type="tel" name="info-tel"  value="{$profile['mobile']}" />{/if}
						{if $reply['isqq']==1} <label for="info-qqhao">ＱＱ号</label><input type="tel" name="info-qqhao"  value="{$profile['qq']}" />{/if}
						{if $reply['isemail']==1} <label for="info-email">邮　箱</label><input type="email" name="info-email"  value="{$profile['email']}" />{/if}
						{if $reply['isaddress']==1} <label for="info-address">地　址</label><input type="text" name="info-address"  value="{$profile['address']}" />{/if}
                        <input type="submit" class="btn-send" value="保存资料" />
						</form>
						</div>					
					</div>
					<div class="end"></div>
				</div>
			</dl>
			{else}
            <div class="prize-title">{$lihegift['lihetitle']}</div>
            
			{if $zhongjiang==0}
			<div class="shadow-nojiang"><img src="{$picnojiang}" /></div>
			{else}
			<img src="{$awardpic}" class="prize-img" />
            <div class="shadow-cloud"></div>
            <dl class="prize-ps">
                {if $lihegift['inkind']}
				<dt>奖品名称：</dt><dd>{$lihegift['title']}</dd>
				<dt>使用规则：</dt><dd>{$lihegift['description']}</dd>
                <dt>兑奖状态：</dt><dd>{if $zhongjiang==2}已兑奖{else}{if $zhongjiang==1}未兑奖{/if}{/if}</dd>
				<dt>兑奖说明：</dt><dd>{$reply['activityinfo']}</dd>
				{else}
				<dt>奖品名称：</dt><dd>{$lihegift['title']}</dd>
				<dt>使用规则：</dt><dd>{$lihegift['description']}</dd>
				<dt>奖品类型：</dt><dd>{$mikaid['typename']}</dd>
				<dt>价值：</dt><dd>{$mikaid['description']}</dd>
				<dt>兑换码：</dt><dd>{$mikaid['mika']}</dd>
				{if $mikaid['activationurl']!=''}<dt>兑换地址：</dt><dd><a href="{$mikaid['activationurl']}">{$mikaid['activationurl']}</a></dd>{/if}
				<dt>兑奖说明：</dt><dd>{$reply['activityinfo']}</dd>
				{/if}
            </dl>
			{if $reply['awarding'] and $lihegift['inkind']}			
			<div class="prize-title-duijiang"><a name="djd" id="djd" ></a>选择下面的兑奖区</div>
			    <div class="selectedtypeid">
				    <select name="typeid" onchange="self.location.href=options[selectedIndex].value">
				    <option value="{$gotoduijiang}" selected="selected">根据您的地点选择兑奖点</option>
					{loop $typelist $types}
						<option value="{php echo $gotoduijiang.'&typeid='.$types['id'].'#djd'}"{if $types['id']==$_GPC['typeid']} selected="selected"{/if}>{$types['quyutitle']}</option>
					{/loop}							
				    </select>
				</div>
			{/if}			
			{if $awarding!='' and $lihegift['inkind']}
			<div class="prize-title-duijiang">兑奖地点</div>
			  <dl class="prize-ps-duijiang">
				{php $i=1;}
				{loop $awarding $awardingrow}
				<div class="con">
				    <div class="title">{$i}、{$awardingrow['shoptitle']}</div>
					<div class="content">
					    {if $zhongjiang==1}
	    				{if $awardingrow['pass']!=''}<div class="textdj"><a href="javascript:void(0);" class="btn-exchange{$i}" >由此商家输入密码当面兑奖</a></div>{else}<div class="textdj">向此商家展示兑奖</div>{/if}
						{/if}
						{if $awardingrow['images']!=''}<div class="text"><img src="{$_W['attachurl']}{$awardingrow['images']}" /></div>{/if}
						{if $awardingrow['address']!=''}<div class="text">地址：{$awardingrow['address']}</div>{/if}						
					</div>
					<div class="end">
	    				<div class="canyu"><a href="tel:{$awardingrow['tel']}">TEL：{$awardingrow['tel']}</a></div>
						{if $awardingrow['carmap']!=''}<div class="mycanyu"><a href="http://api.map.baidu.com/marker?location={$awardingrow['carmap']}&title={php echo urlencode($awardingrow['shoptitle'])}&content={$awardingrow['address']}&output=html&src=weiba|weiweb">导航</a></div>{/if}
					</div>
				</div>
				{php $i++;}
                {/loop}				
            </dl>
			{/if}
			{/if}			
            <div class="btn-layout">
                <a href="{$mylihe}" class="btn-see"></a>
                {if $giftlihe!=0}<a href="{$againreglihe}" class="btn-again2"></a>{/if}
            </div>
			{/if}
        </section>
        <footer data-role="footer">
            {if $reply['iscopyright']==1}<a href="{$reply['copyrighturl']}" class="copyright">&copy;{$reply['copyright']}</a>{else}<a href="javascript:;" class="copyright">{if empty($footer_off)}&copy;{if empty($_W['account']['name'])}www.zheyitianShi.Com团队{else}{$_W['account']['name']}{/if}&nbsp;&nbsp;{$_W['setting']['copyright']['statcode']}{/if}</a>{/if}
        </footer>
    </div>
    <div class="panel-box">
        <div class="panel-content">
            <div class="panel-close"></div>
            <span class="icon-prize-useless"></span><br/>有兑奖地点输入兑奖密码进行兑奖
            <hr class="common-hr" />
            <form action="{$liheduijiang}" method="post">
                <label for="info-pass">兑换密码</label>
                <input type="hidden" value="{$uid}" name="info-prize">                
                <input type="text" name="info-pass" />
                <div class="btn-layout">
                    <input type="reset" class="btn-reset" value="重填"/>
                    <input type="submit" class="btn-confirm" value="确定"/>
                </div>
            </form>
        </div>
    </div>
{template 'jssdk'}
</body>
</html>